package com.xinxing.city.recovery;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;

import androidx.annotation.Nullable;

import com.xinxing.city.recovery.ui.CompOrderActivity;
import com.xinxing.city.recovery.utils.StringUtil;

public class SplashActivity extends Activity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        DisplayMetrics dm = new DisplayMetrics();
        this.getWindowManager().getDefaultDisplay().getMetrics(dm);
        int screenWidth = dm.widthPixels;
        Log.e("TTT","dp  "+StringUtil.pxToDp(this,800));
        Constant.screenWidth = screenWidth;
        if(screenWidth==800){
            Constant.Left = 310;
            Constant.Right = 300;
            startActivity(new Intent(SplashActivity.this,MainActivity800.class));
        }else{
            Constant.Left = 420;
            Constant.Right = 420;
            startActivity(new Intent(SplashActivity.this, MainActivity.class));
        }
        SplashActivity.this.finish();
    }
}
